﻿using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;

namespace OcelotTest1
{
    public class Program
    {
        public static void Main(string[] args)
        {
            CreateWebHostBuilder(args).Build().Run();
        }

        public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
            .UseStartup<Startup>()
            .UseUrls("http://127.0.0.1:60101")
            .ConfigureAppConfiguration((hostingContext, builder) =>
            {
                //不结合Consul
                builder.AddJsonFile("./Config/ReRoutes.json ", false, true);

                //结合Consul
                //builder.AddJsonFile("./Config/ReRoutesUseServiceDiscovery.json ", false, true);
            });
    }
}
